<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%
	StringBuffer strURL = request.getRequestURL();
	String URL = strURL.toString();
	String contPath = request.getContextPath();
	int nIndex = URL.indexOf(contPath);
	URL = "http://tugo.cn/weixin_aef/";
	%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
	content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/iconfont.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-slide.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/user_function.css" />
<link rel="stylesheet" href="<%=URL%>newedition/css/aui-pull-refresh.css" />
<script type="text/javascript" src="<%=URL%>newedition/js/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-slide.js"></script>
<script type="text/javascript" src="<%=URL%>js/base64.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-toast.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/auipopupstyle.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/base.js?version=3.4"></script>
<script type="text/javascript" src="<%=URL%>js/cookies.js?version=1.1"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-pull-refresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/doRefresh.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/aui-dialog.js"></script>
<script type="text/javascript" src="<%=URL%>newedition/js/recycle/user_function.js?version=4.5"></script>
<title>发起售油</title>
</head>

<body>
	<input type=hidden name=contextPath
		value=<%=URL%> id="requestpath">
	<div class="body-box aui-refresh-content">
		<div class="header aui-margin-b-15">
			<div class="header01 aui-padded-15">创建任务</div>
			<div class="header02 aui-content aui-margin-b-15">
				<ul class="aui-list aui-media-list">
					<li class="aui-list-item aui-list-item-middle"
						onclick="$(location).attr('href', 'user_functionAddressList.jsp');">
						<div class="aui-media-list-item-inner">
							<div class="aui-list-item-label-icon">
								<i class="aui-iconfont aui-icon-location"
									style="font-size: 1rem;"></i>
							</div>
							<div class="aui-list-item-inner aui-list-item-arrow">
								<div class="aui-list-item-text">
									<div class="aui-list-item-title aui-font-size-14">
										<span style="color: #434343;" id="realname"></span>
									</div>
									<!--<div class="aui-list-item-right">08:00</div>-->
								</div>
								<div class="aui-list-item-text">
									<span style="color: #5c5c5c;" id="addressstr"></span>
								</div>
							</div>
						</div>
					</li>
					<li class="aui-list-item aui-list-item-middle">
						<div class="phone">
							<span>联系电话:</span> <input type="tel" id="iphone" placeholder="请输入电话号码..." />
						</div>
					</li>
				</ul>

			</div>
		</div>
		<div class="body aui-margin-b-15">
			<div class="body-title aui-padded-15">
				<span class="point"></span> <span>售油数量</span> <span class="point"></span>
			</div>
			<div class="body-input aui-margin-b-15">
				<input type="number" placeholder="00" id="num" onfocus="dialog_up(this)" />
			</div>
			<div class="body-icon">
				<span>桶</span>
			</div>
		</div>
		<div class="remarks">
			<div>备注:</div>
			<textarea id="textarea" onKeyDown="textdown(event)" onKeyUp="textup()" onfocus="if(value==''){value=''}" onblur="if (value ==''){value=''}"></textarea>
		</div>
		<div class="PS">注:预约收油发布以后，我们会马上派车收油并及时通知你，请保持通话畅通。</div>
		<div class="submit">
			<span onclick="insertorders()">确认发布</span>
		</div>
	</div>
</body>
<script>
function textdown(e) {
	textevent = e;
	if (textevent.keyCode == 8) {
		return;
	}
	if (document.getElementById('textarea').value.length >= 500) {
		if (!document.all) {
			textevent.preventDefault();
		} else {
			textevent.returnValue = false;
		}
	}
}

function textup() {
	var s = document.getElementById('textarea').value;
	//判断ID为text的文本区域字数是否超过100个 
	if (s.length > 500) {
		document.getElementById('textarea').value = s.substring(0, 500);
	}
}
		var dialog = new auiDialog();
		var toast = new auiToast();
		
		function dialog_up(obj) {
			dialog.alert({
				title: "请输入售油数量",
				text: "",
				msg: '',
				buttons: ['取消', '确定'],
				input: true
			}, function(ret) {
				obj.value = ret.text;
			});
			$('#auiInput').focus();
		}
		dorefresh();
		$(function() {
			 getHistoryAddress(0); 
			$(".address").click(function() {
				location.href = "user_functionAddressList.jsp"
			})
		})
		
	</script>

</html>